package com.g17.virtualpetbackend.controller;

import com.g17.virtualpetbackend.entity.Office;
import com.g17.virtualpetbackend.service.OfficeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class OfficeController {

    @Autowired
    private OfficeService officeService;

    @GetMapping("/officeDetail")
    public Office getOfficeDetail(String office_name){
        return officeService.getOfficeDetail(office_name);
    }

    @GetMapping("/offices")
    public List<Office> getOffices(){
        return officeService.getOffices();
    }

}
